package 笔试.小米笔试;

import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine())
        {
            String str = sc.nextLine();
            if (str.length() < 8 )
                System.out.println("Irregular password");
            else
            {
                int cnt = 0;
                boolean word = false;
                boolean WORD = false;
                boolean num = false;
                boolean symbol = false;

                for (int j = 0; j < str.length(); j++)
                {

                    if (!word && String.valueOf(str.charAt(j)).matches("[a-z]"))
                    {
                        word = true;
                        cnt++;
                    }
                    if (!WORD && String.valueOf(str.charAt(j)).matches("[A-Z]"))
                    {
                        WORD = true;
                        cnt++;
                    }
                    if (!num && Character.isDigit(str.charAt(j)))
                    {
                        num = true;
                        cnt++;
                    } else if (!symbol)
                    {
                        symbol = true;
                        cnt++;
                    }
                }
                if (cnt == 4)
                    System.out.println("Ok");
                else
                    System.out.println("Irregular password");

            }
        }
    }
}


